package com.elinshaw.elasticsearch.config;

import org.springframework.context.annotation.Configuration;

/**
 * @author Administrator
 */
@Configuration
public class Config {

/*    @Bean
    public RestHighLevelClient restHighLevelClient() {
        HttpHeaders defaultHeaders = new HttpHeaders();
        ClientConfiguration clientConfiguration = ClientConfiguration.builder()
                .connectedTo("localhost:9200")
                .withConnectTimeout(Duration.ofSeconds(5))
                .withSocketTimeout(Duration.ofSeconds(3))
                .withDefaultHeaders(defaultHeaders)
                .build();
        return RestClients.create(clientConfiguration).rest();
    }*/

/*    @Bean
    public ReactiveElasticsearchClient reactiveElasticsearchClient() {
        ClientConfiguration clientConfiguration = ClientConfiguration.builder()
                .connectedTo("localhost:9200", "localhost:9291")
                .build();
        return ReactiveRestClients.create(clientConfiguration);
    }*/

}
